new WOW().init();
//锚点跳转滑动效果  
 $('#bs-example-navbar-collapse-1 a[href],#head a[href],#back a[href]').click(function () {

    if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
      var $target = $(this.hash);
      $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');

      if ($target.length) {
        var targetOffset = $target.offset().top;
        $('html,body').animate({
          scrollTop: targetOffset
        }, 1000);
        return false;
      }
    }
  });
  //给整个页面绑定一个滚动条事件
  $(document).scroll(function () {
    var distance = $(this).scrollTop();

    if (distance > 140) {
      $("#back").css({ zIndex: 99998, opacity: 1 });
    }
    if (distance > 340) {
      //显示返回顶部
      $('#navbar-white').css({
        backgroundColor: 'rgba(255, 255, 255, .8)', transition: '0.2s'
      })
      $("#header").css({
        backgroundColor: 'rgba(255, 255, 255, .8)', paddingBottom: 0, position: 'sticky', left: 0, border: 0, transition: '0.2s'

      });

    } else {

      if (distance < 140) {
        //隐藏返回顶部
        $("#back").css({ zIndex: -99998, opacity: 0 });
      }
      $("#header").css({ backgroundColor: 'transparent', paddingBottom: '1em', position: 'relative' });
      $('#navbar-white').css({
        backgroundColor: 'rgba(255, 255, 255)'
      })
    }
  })
 setTimeout(()=>{
  $('#jiazhai').css({display:'none'})
 },500) 
